package org.bdddemo.impl;

import org.bdddemo.model.Circulation;
import org.bdddemo.model.Vehicule;
import org.bdddemo.model.Vehicule.Builder;

public class VehiculeBuilderImpl implements Vehicule.Builder {

	// attribut
	private String modele;
	private String marque;
	private String immatriculation;
	private String puissanceFiscale;
	private CirculationImpl infoCirculation;

	public Builder model(String model) {
		this.modele = model;
		return this;
	}

	public Builder marque(String marque) {
		this.marque = marque;
		return this;
	}

	public Builder immatriculation(String immatriculation) {
		this.immatriculation = immatriculation;
		return this;
	}

	public Builder puissanceFiscale(String puissanceFiscale) {
		this.puissanceFiscale = puissanceFiscale;
		return this;
	}

	public Builder infoCirculation(Circulation circulation) {

		this.infoCirculation = (CirculationImpl) circulation;
		return this;
	}

	public Vehicule toVehicule() {

		return new VehiculeImpl(modele, marque, immatriculation,
				puissanceFiscale, infoCirculation)

		;
	}

}
